﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>到期提醒</summary>
	[Object("到期提醒", "CKQDJK", "到期提醒")]
	[Browsable(true)]
	[DisplayName("到期提醒")]
	[ReadOnly(false)]
	[Serializable()]
	public class 到期提醒 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：许可证号</summary>
		private string m_许可证号;
		
		/// <summary>标示属性许可证号是否为空的字段。</summary>
		private bool m_Is许可证号Null = true;
		
		/// <summary>内部变量：申请人</summary>
		private string m_申请人;
		
		/// <summary>标示属性申请人是否为空的字段。</summary>
		private bool m_Is申请人Null = true;
		
		/// <summary>内部变量：矿山名称</summary>
		private string m_矿山名称;
		
		/// <summary>标示属性矿山名称是否为空的字段。</summary>
		private bool m_Is矿山名称Null = true;
		
		/// <summary>内部变量：有效期止</summary>
		private System.DateTime m_有效期止;
		
		/// <summary>标示属性有效期止是否为空的字段。</summary>
		private bool m_Is有效期止Null = true;
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		public static string TypeID = "CKQDJK.到期提醒";
		
		/// <summary>属性许可证号</summary>
		[Member("许可证号", "许可证号", "System.String", 50, false, false, "许可证号")]
		[Browsable(true)]
		[DisplayName("许可证号")]
		[ReadOnly(false)]
		public string 许可证号 {
			get {
				return this.m_许可证号;
			}
			set {
				this.m_许可证号 = value;
				this.m_Is许可证号Null = false;
			}
		}
		
		/// <summary>属性申请人</summary>
		[Member("申请人", "申请人", "System.String", 200, false, false, "申请人")]
		[Browsable(true)]
		[DisplayName("申请人")]
		[ReadOnly(false)]
		public string 申请人 {
			get {
				return this.m_申请人;
			}
			set {
				this.m_申请人 = value;
				this.m_Is申请人Null = false;
			}
		}
		
		/// <summary>属性矿山名称</summary>
		[Member("矿山名称", "矿山名称", "System.String", 200, false, false, "矿山名称")]
		[Browsable(true)]
		[DisplayName("矿山名称")]
		[ReadOnly(false)]
		public string 矿山名称 {
			get {
				return this.m_矿山名称;
			}
			set {
				this.m_矿山名称 = value;
				this.m_Is矿山名称Null = false;
			}
		}
		
		/// <summary>属性有效期止</summary>
		[Member("有效期止", "有效期止", "System.DateTime", 8, false, false, "有效期止")]
		[Browsable(true)]
		[DisplayName("有效期止")]
		[ReadOnly(false)]
		public System.DateTime 有效期止 {
			get {
				return this.m_有效期止;
			}
			set {
				this.m_有效期止 = value;
				this.m_Is有效期止Null = false;
			}
		}
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, true, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			到期提醒 到期提醒 = ((到期提醒)(obj));
			if ((到期提醒.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("许可证号")) {
				return this.m_Is许可证号Null;
			}
			if (propname.Equals("申请人")) {
				return this.m_Is申请人Null;
			}
			if (propname.Equals("矿山名称")) {
				return this.m_Is矿山名称Null;
			}
			if (propname.Equals("有效期止")) {
				return this.m_Is有效期止Null;
			}
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("许可证号")) {
				this.m_Is许可证号Null = true;
				return;
			}
			if (propname.Equals("申请人")) {
				this.m_Is申请人Null = true;
				return;
			}
			if (propname.Equals("矿山名称")) {
				this.m_Is矿山名称Null = true;
				return;
			}
			if (propname.Equals("有效期止")) {
				this.m_Is有效期止Null = true;
				return;
			}
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
		}
	}
}
